//
//  Define.h
//  OrderNow
//
//  Created by Familly on 2/15/14.
//  Copyright (c) 2014 Familly. All rights reserved.
//
#import "ONAppDelegate.h"
#define APP_DELEGATE            ((ONAppDelegate*)[UIApplication sharedApplication].delegate)
#define FULLPATH(x)             [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:x]
#define SAFE_RELEASE(p)			{ if (p) { [(p) release]; (p) = nil;  } }

#define CACHE_PATH              (NSString*)[NSSearchPathForDirectoriesInDomains( NSCachesDirectory, NSUserDomainMask, YES ) objectAtIndex:0]

#ifdef DEBUG
#   define NSLog(...) NSLog(__VA_ARGS__)
#else
#   define NSLog(...)
#endif


#define STATUS_BAR_HEIGHT 20
#define NAVIGATION_BAR_HEIGHT 44
#define TAB_BAR_HEIGHT 49


#define  RADIUS_CIRCLE 200


#define HEIGHT_IPHONE_5 568
#define HEIGHT_IPHONE_4 480

#define _DATA_REAL_ 0

#define GET_STRING(key, langid) NSLocalizedStringFromTable(key, langid, nil)

__unused static NSString *constkLanguage=@"Language";
__unused static NSString *constkInitData=@"initData";

#if (_DATA_REAL_)
#else
#endif



#if TARGET_IPHONE_SIMULATOR
#define IS_SIMULATOR() YES
#else
#define IS_SIMULATOR() NO
#endif


#define TEXTFIELD_BORDER_COLOR          [UIColor colorWithRed:231/255.0f green:231/255.0f blue:231/255.0f alpha:1.0]
#define TEXTFIELD_PLACE_HOLDER          [UIColor colorWithRed:231/255.0f green:231/255.0f blue:231/255.0f alpha:1.0]

#define BG_APP          [UIColor colorWithRed:243/255.0f green:237/255.0f blue:226/255.0f alpha:1.0]


#define GM_DIRECTION_API    @"https://maps.googleapis.com/maps/api/distancematrix/json?origins=%@&destinations=%@&&mode=driving&units=metric&sensor=false&key=AIzaSyAntOGUO05WtEaq3Le8O-rz35kbXJKSJag"


 #define REGEX_FOR_NUMBERS   @"^([+]?)(?:|0|[1-9]\\d*)(?:\\.\\d*)?$"//[+-]
 #define IS_A_PHONE_NUMBER(string) [[NSPredicate predicateWithFormat:@"SELF MATCHES %@", REGEX_FOR_NUMBERS] evaluateWithObject:string]






